<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2020/12/29
  Time: 9:12 上午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--   搜索和分页 begin--%>
<div class="container-fluid" style="margin-top: 10px">
    <div class="row">
        <div class="col-md-3">
            <form role="form">
                <div class="form-group">
                    <select onchange="select_type(this)" class="form-control" id="type_select">
                        <option value="-1">===请您选择产品类型===</option>
                        <c:forEach items="${typeList}" var="t">
                            <option <c:if test="${typeId == t.id}">selected</c:if> value="${t.id}">${t.name}</option>
                        </c:forEach>
                    </select>
                </div>
            </form>
        </div>

        <div class="col-md-5">
            <div>
                <form class="bs-example bs-example-form" role="form">
                    <div class="row">
                        <div class="col-lg-6">
                            <div class="input-group">
                                <input type="text" value="${name}" class="form-control" placeholder="根据产品名模糊查询" id="name_input">
                                <span class="input-group-btn">
                        <button class="btn btn-info" type="button" onclick="searchs()">
                            搜索
                        </button>
                    </span>
                            </div><!-- /input-group -->
                        </div><!-- /.col-lg-6 -->
                    </div><!-- /.row -->
                </form>
            </div>
        </div>

    </div>
</div>

<div class="container-fluid">
    <div class="row">
        <c:forEach items="${pageInfo.list}" var="p">
            <div class="col-xs-12 col-md-2">
                <div class="thumbnail">
                    <img src="/imgs/${p.goodsImgs}"
                         alt="通用的占位符缩略图">
                    <div class="caption">
                        <a href="/product/productdetail?goodsId=${p.goodsId}" style="font-size: 24px">${p.goodsName}</a>
                        <p class="text-success">￥:${p.goodsPrice}</p>
                        <p>${p.goodsRemark}</p>
                    </div>
                    <div style="text-align: right" class="text-danger">
                        <span class="glyphicon glyphicon-heart-empty"></span>
                    </div>
                </div>
            </div>
        </c:forEach>
    </div>
</div>

<div class="container" style="text-align: center">
    <%@ include file="../common/page2.jsp"%>
</div>

<%--    搜索分页end --%>

<script>

</script>